package com.socket.serializableTest;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

/**
 * DeserialTest--bdqnPractice
 *
 * @author: Jovi
 * @createTime: 2017-09-07 17:36
 **/
public class DeserialTest {
    public static void main(String[] args) {
        try {
            FileInputStream fis = new FileInputStream("people.txt");
            ObjectInputStream ois = new ObjectInputStream(fis);

            Person person = (Person) ois.readObject();
            ois.close();
            fis.close();
            System.out.println("Person Deserial :"+person);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

}
